class Base
{
	public int AB;
}

class Try
{
	public boolean BC;
	public Base bfirst;
	public Base bsecond;
}

public class GarbageCollectionTest
{
	public static void main(String[] str) {
		int[] a;
		int[] b;
		int[] c;
		int[] d;
		int[] f;
		Base pbase;
		Base pbase1;
		Try ptry;
		Try ptry1;
		Try[] ptry2;
		Try ptry3;
		
		a=new int[100];
		a[1]=101;

		b=new int[100];
		b[1]=102;

		pbase1=new Base();
		pbase1.AB=1;
		
		pbase1=new Base();
		pbase1.AB=2;
	
		pbase=pbase1;
		
		pbase1=new Base();
		pbase1.AB=3;
		
		ptry1=new Try();
		ptry1.BC=true;
		ptry1.bfirst=new Base();
		ptry1.bfirst.AB=121;
		ptry1.bsecond=new Base();
		ptry1.bsecond.AB=122;
		
		ptry1=new Try();
		ptry1.BC=false;
		ptry1.bfirst=new Base();
		ptry1.bfirst.AB=231;
		ptry1.bsecond=new Base();
		ptry1.bsecond.AB=232;
		
		ptry=ptry1;
		
		ptry1=new Try();
		ptry1.BC=true;
		ptry1.bfirst=new Base();
		ptry1.bfirst.AB=341;
		ptry1.bsecond=new Base();
		ptry1.bsecond.AB=342;
		
		ptry1.bfirst=new Base();
		ptry1.bfirst.AB=343;
		ptry1.bsecond=new Base();
		ptry1.bsecond.AB=344;
		
		c=new int[100];
		c[1]=103;
	    
		ptry2=new Try[]{new Try(), new Try()};		
		ptry2[0].BC=false;
		ptry2[0].bfirst=new Base();
		ptry2[0].bfirst.AB=21;
		ptry2[0].bsecond=new Base();
		ptry2[0].bsecond.AB=22;		
		ptry2[1].BC=true;
		ptry2[1].bfirst=new Base();
		ptry2[1].bfirst.AB=23;
		ptry2[1].bsecond=new Base();
		ptry2[1].bsecond.AB=24;
		
		ptry2=new Try[]{new Try(), new Try()};		
		ptry2[0].BC=false;
		ptry2[0].bfirst=new Base();
		ptry2[0].bfirst.AB=25;
		ptry2[0].bsecond=new Base();
		ptry2[0].bsecond.AB=26;	
		ptry2[1].BC=true;
		ptry2[1].bfirst=new Base();
		ptry2[1].bfirst.AB=27;
		ptry2[1].bsecond=new Base();
		ptry2[1].bsecond.AB=28;
		
		ptry3=ptry2[1];
		
		ptry2=new Try[]{new Try(), new Try()};	
		ptry2[0].BC=false;
		ptry2[0].bfirst=new Base();
		ptry2[0].bfirst.AB=29;
		ptry2[0].bsecond=new Base();
		ptry2[0].bsecond.AB=30;	
		
		ptry2[0].bfirst=new Base();
		ptry2[0].bfirst.AB=31;
		ptry2[0].bsecond=new Base();
		ptry2[0].bsecond.AB=32;	
		
		ptry2[1].BC=true;
		ptry2[1].bfirst=new Base();
		ptry2[1].bfirst.AB=33;
		ptry2[1].bsecond=new Base();
		ptry2[1].bsecond.AB=34;
		
		ptry2[1].bsecond=new Base();
		ptry2[1].bsecond.AB=35;
		
		d=new int[100];
		d[1]=104;    
		
		f=new int[100];
		f[1]=105;

		StaticJavaLib.println(a[1]);
		StaticJavaLib.println(b[1]);
		StaticJavaLib.println(pbase.AB);
		StaticJavaLib.println(pbase1.AB);
		StaticJavaLib.println(ptry.BC);
		StaticJavaLib.println(ptry.bfirst.AB);
		StaticJavaLib.println(ptry.bsecond.AB);
		StaticJavaLib.println(ptry1.BC);
		StaticJavaLib.println(ptry1.bfirst.AB);
		StaticJavaLib.println(ptry1.bsecond.AB);
		StaticJavaLib.println(c[1]);
        StaticJavaLib.println(ptry2[0].BC);
        StaticJavaLib.println(ptry2[0].bfirst.AB);
        StaticJavaLib.println(ptry2[0].bsecond.AB);
        StaticJavaLib.println(ptry2[1].BC);
        StaticJavaLib.println(ptry2[1].bfirst.AB);
        StaticJavaLib.println(ptry2[1].bsecond.AB);
        StaticJavaLib.println(ptry3.BC);
        StaticJavaLib.println(ptry3.bfirst.AB);
        StaticJavaLib.println(ptry3.bsecond.AB);
		StaticJavaLib.println(d[1]);
		StaticJavaLib.println(f[1]);
	}
}

